<?php


define('ACCESS_KEY9296',true);
require('./include/init.php');



if(!isset($_GET['id'])||empty($_GET['id'])){
    $id=1;
}
else{
    $id=$_GET['id'];
}


$mysql = mysql::getIns();
$row = $mysql->getRow("SELECT * FROM cake WHERE cake_id=$id ");
//var_dump($row);
$class=$row['cake_class'];
$res=$mysql->query("SELECT * FROM cake where cake_class=$class ORDER BY Rand() DESC LIMIT 0,1");
$id=array();

$a = 0;
while ($other = mysql_fetch_array($res, MYSQL_ASSOC)) {
       $img[$a]=$other['cake_images'];
       $id[$a]=$other['cake_id'];
       $price[$a]=$other['cake_price'];
       $a++;
   }

//var_dump($other);
//
include(ROOT.'view/shop/header.html');
include(ROOT.'view/shop/single.html');
include(ROOT.'view/shop/footer.html');